#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <stdlib.h>



typedef struct stu
{
    int number;
    int eng;
    int math;
    int cpp;
    int music;
    int art;
}stu;

int compare(const void* p1, const void* p2)
{
    return (*(int*)p1 - *(int*)p2);
}


void loadgrade(stu* st)
{
    scanf("%d", &(st->number));
    scanf("%d", &(st->eng));
    scanf("%d", &(st->math));
    scanf("%d", &(st->cpp));
    scanf("%d", &(st->music));
    scanf("%d", &(st->art));
}


int main()
{
    int n;
    while (scanf("%d", &n) != EOF)
    {
        stu* st = (stu*)malloc(sizeof(stu) * n);
        //float *rank = (float *)malloc(sizeof(int)*n);
        for (int i = 0; i < n; ++i)
        {
            loadgrade(&st[i]);
        }
        for (int i = 0; i < n; ++i)
        {
            printf("%d ", st[i].number);
            printf("%d ", st[i].eng);
            printf("%d ", st[i].math);
            printf("%d ", st[i].cpp);
            printf("%d ", st[i].music);
            printf("%d ", st[i].art);
            printf("%.1f\n", (st[i].eng + st[i].math + st[i].cpp + st[i].music + st[i].art) / 5.);
        }
        //qsort(rank,n,sizeof(int),compare);
        float sum = 0;
        for (int j = 0; j < n; ++j)
        {
            sum += st[j].eng;
        }
        printf("%.1f ", sum / n);
        sum = 0;
        for (int j = 0; j < n; ++j)
        {
            sum += st[j].math;
        }
        printf("%.1f ", sum / n);
        sum = 0;
        for (int j = 0; j < n; ++j)
        {
            sum += st[j].cpp;
        }
        printf("%.1f ", sum / n);
        sum = 0;
        for (int j = 0; j < n; ++j)
        {
            sum += st[j].music;
        }
        printf("%.1f ", sum / n);
        sum = 0;
        for (int j = 0; j < n; ++j)
        {
            sum += st[j].art;
        }
        printf("%.1f\n", sum / n);
    }
    return 0;
}
